Skip to main content

Sugar LED

Lights up by high/low levels or PWM drive, commonly used for status indication or routine visual warnings.

The Sugar LED comes in three colors: red, yellow, and green.
![image.png](方糖 LED.assets/1623384120731-3d533ba2-c565-4258-a33b-3fb44b6ae0d5.png)

Parameters


Size24 x 24 x 23 mm
Weight5.6 g
SignalDigital Output / Analog Output
1 (High level): Light on
0 (Low level): Light off
typeRed, Green, Yellow

Wiring


The Sugar system includes three colors of LEDs: red, green, and yellow. Below, we use the green LED as an example, connecting it to P1 on the Robotbit Edu using a 3-pin terminal cable. (Any of the eight white terminals can be used for connection. Note that the actual wiring must correspond to the program written.)

After turning on the Robotbit power, you can see the red light at the bottom of the LED module illuminate (indicating the module is powered normally).
![image.png](方糖 LED.assets/1634634541473-8d0d4b52-bd40-4d3a-a6f5-d1d445708fcb.png)

Programming


#LED Module Blinking Cycle
image.png

#LED Module Breathing Light

Control the analog output of pin1 from 0~1023, brightness from off to on, then from on to off, cycling in this manner.
microbit.png